﻿using DVM.DV.Extensions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DVM.VM
{
    public class ProductViewModel
    {

        /// <summary>
        /// 主键
        /// </summary>
        public int ProductId { get; set; }

        /// <summary>
        /// 产品类型名称
        /// </summary>
        [PropertySet(DBField.ProductTypeId)]
        public string ProductTypeName { get; set; }

        /// <summary>
        /// 图片地址信息
        /// </summary>
        [PropertySet(DBField.ProductImageId)]
        public ImageViewModel ImageUrl { get; set; }

        /// <summary>
        /// 其他ID
        /// </summary>
        public int OtherId { get; set; }

        /// <summary>
        /// 业务逻辑计算
        /// </summary>
        public int Calculate { get; set; }
    }


    public class ImageViewModel
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 图片地址
        /// </summary>
        public string ImageUrl { get; set; }
    }

}
